#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=2e5+1000;
typedef int LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn];
struct Tree{
    LL l,r,maxval,tag;
}tree[maxn*6];
inline void push_up(LL p){
     tree[p].maxval=max(tree[p*2].maxval,tree[p*2+1].maxval);
}
inline void build(LL p,LL l,LL r){
     tree[p].l=l;tree[p].r=r;tree[p].maxval=tree[p].tag=-1;
     if(l==r) {tree[p].maxval=a[l];return;}
     LL mid=(l+r)>>1;
     build(p*2,l,mid);build(p*2+1,mid+1,r);
     push_up(p);
}
inline void addtag(LL p,LL d){
     tree[p].tag=d;
     tree[p].maxval=tree[p].tag;
}
inline void push_down(LL p){
     if(tree[p].tag!=-1){
        addtag(p*2,tree[p].tag);
        addtag(p*2+1,tree[p].tag);
        tree[p].tag=-1;
     }
}
inline void update1(LL p,LL l,LL r,LL d){
     if(l<=tree[p].l&&r>=tree[p].r){
        addtag(p,d);
        return;
     }
     push_down(p);
     LL mid=(tree[p].l+tree[p].r)>>1;
     if(l<=mid) update1(p*2,l,r,d);
     if(r>mid) update1(p*2+1,l,r,d);
     push_up(p);
     return;
}
inline void update2(LL p,LL d){
     ///tree[p].tag=max(tree[p].tag,d);

     return;
}
inline LL query(LL p,LL l,LL r){
     if(l<=tree[p].l&&r>=tree[p].r){
        return tree[p].maxval;
     }
     push_down(p);
     LL mid=(tree[p].l+tree[p].r)>>1;
     LL ans=-1;
     if(l<=mid) ans=max(ans,query(p*2,l,r));
     if(r>mid) ans=max(ans,query(p*2+1,l,r));
     push_up(p);
     return ans;
}
int main(void){
    LL n;n=read();
    for(LL i=1;i<=n;i++) a[i]=read();
    build(1,1,n);
//    for(LL j=1;j<=n;j++){
//        printf("%d ",query(1,j,j));
//    }printf("\n");
    LL m;m=read();
    for(LL i=1;i<=m;i++){
        LL op;op=read();
        if(op==1){
           LL pos,x;pos=read();x=read();
           update1(1,pos,pos,x);
        }
        else{
           LL x;x=read();
           update2(1,x);
        }
        for(LL j=1;j<=n;j++){
            printf("%d ",query(1,j,j));
        }printf("\n");
    }
    for(LL i=1;i<=n;i++){
        printf("%d ",query(1,i,i));
    }printf("\n");
   	return 0;
}
